<template>
  <div>
    <Form ref="formValidate"
      :model="formValidate"
      :label-width="120"
      :label-colon="true"
      :disabled="type === 3"
      :rules="formRules">
      <FormItem label="农村名称" prop="rfRuralName">
        <Input v-model="formValidate.rfRuralName" placeholder="请输入" style="width: 200px;"></Input>
      </FormItem>
      <FormItem label="统计年份">
        <DatePicker
          type="year"
          placeholder="请选择统计年份"
          style="width: 200px"
          format="yyyy"
          @on-change="formValidate.statisticsYear = $event"
          v-model="formValidate.statisticsYear"></DatePicker>
      </FormItem>
      <FormItem label="党员活动参与率%">
        <Input v-model="formValidate.activityRate" placeholder="请输入" style="width: 200px;"></Input>
      </FormItem>
      <FormItem :label-width="0" style="text-align: right;">
        <Button style="margin-right: 10px;" @click="publicReset('formValidate')">取消</Button>
        <Button type="primary" @click="publicSubmit('formValidate')">确定</Button>
      </FormItem>
    </Form>
  </div>
</template>
<script>
import { updateMixin } from '@/mixin/index'
import API_KEY from '../../../api'
import store from '@/store'
export default {
  mixins: [updateMixin],
  data () {
    return {
      formValidate: {
        fkRuralId: store.getters.userInfo.deptList[0].id,
        rfRuralName: '',
        statisticsYear: '',
        activityRate: ''
      },
      formRules: {
        rfRuralName: [{ required: true, message: '请输入农村名称', trigger: 'blur' }]
      },
      action: {
        readDataById: API_KEY.ruralInfo.curdRural,
        createData: API_KEY.ruralInfo.curdRural,
        updateData: API_KEY.ruralInfo.curdRural
      }
    }
  },
  created () {
  },
  components: {

  },
  methods: {

  }
}
</script>

<style scoped="scoped">
</style>
